Skip to content

feat(scenarios): dataset-card questions name their ask kind, and a round counts every kind - #36065

Merged
objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/area-a4B-35113
Nov 21, 2026
Merged

objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/area-a4B-35113

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread
Fixes #35113
Fixes #35098
Clause-②: yes (widening) — new optional card key askKind on QuestionSchema and DatasetQuestionSchema; new exports ASK_KINDS, AskKind, AskKindSchema, questionTurnKind, checkAskKinds, askTurns, askKindCounts and AskTurn (package root); kindTally, kindCell and KindTally (./runner); new optional fields QuestionResult.askKind, DatasetQuestionResult.askKind and HalfScores.kinds (./runner)
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用户无感;开源评测里两张问数场景卡(订单到回款、差旅报销)的每道题都标明了题型,每轮问数评测的记录按十种题型分别计数,另外差旅报销卡的建应用说明写清了第二步由哪位财务审批。
  • 为什么做:「MCP 二期与问数」专项要求开源卡覆盖托管问数集的十种题型,让问数退化当天在开源仓、零成本被发现;差旅卡那句话含糊,让部分构建把第二步审批派给了财务经理。
  • 出错会怎样:只影响评测卡的打分与评测报告,不碰产品代码,可直接撤回;两张卡的指纹变了,评测日序列在此处分段。
  • 要你做什么:无

What changes

Card one: the ten ask kinds. Each question and dataset question of the two open dataset cards (order_to_cash, travel_expense) now names its ask kind (askKind), one of the ten kinds the hosted ask set asks: count, group_sum, top_n, time_range, join, owner_latest, business_term, ambiguous, forbidden, unanswerable (D6 = A on #34659: the kinds, never the hosted fixture; no hosted question is copied).

  • Premise reading: the card counted only the five dataset questions per card. The ten ordinary questions per card already ask the figure kinds, the forbidden leak reading as a member persona, and unanswerable. Counted per turn (a question once per persona it lists, as the runner asks it), the two cards already ask every kind at least twice. So no question is added: the change names the kinds, holds them to the cards, and makes a round report them. Adding figure questions also risks the near-miss trap MCP ask: "claims" matches two measures (Claim count, Claimed amount), so claims_by_status and claimed_last_month are asked back in both arms instead of answered #35544 hit (a lifted word that near-misses a dataset measure).
  • Per turn, forbidden is read off the card: a turn asked as a persona whose truth is withheld is a forbidden ask whatever kind the question names.
  • The loader (checkAskKinds, packages/qa/scenarios/src/ask-kinds.ts) refuses a kind its question contradicts, at askKind: top_n needs a topN truth, time_range an in_window filter, join a relation path, group_sum a groupBy, count none, owner_latest a groupBy ending on a person field (a declared lookup to an object a persona's record names, such as employee, or a declared user-handle field), business_term exactly the metric_selected dataset questions, ambiguous exactly the asked_back ones, unanswerable exactly the unanswerable truths, and a declared forbidden only on a question withheld from every persona it lists. A card that names one kind names the kind of every question and dataset question, all or none. A card that names no kind loads as it did before kinds existed, with dataset questions or without, so no card the released loader accepted is refused.
  • The runner stamps each turn's kind on its result (askKind on every question and dataset-question result). The scorecard counts the asks kind by kind (HalfScores.kinds) and adds Run · kinds / Iterate · Run · kinds, all ten kinds in order, a kind not asked shown as 0 asked. summary sums the row. A card that names no kind, and an older record, show no row.
  • docs/qa/scenarios/README.md gains an "Ask kinds" section: the ten kinds with the rule each is held to, and the per-card count table (no kind at zero). A test holds the cards to the table's figures. It keeps them as a literal, because reading the README from the package's tests would be an undeclared cross-package input (check:cross-package-test-inputs).
Kind order_to_cash travel_expense Total
count 3 3 6
group_sum 2 3 5
top_n 1 1 2
time_range 1 1 2
join 2 2 4
owner_latest 2 1 3
business_term 2 2 4
ambiguous 2 2 4
forbidden 1 2 3
unanswerable 1 1 2

Card two (folded in): the step-2 approver in the travel_expense prose. The detailed prompt said "the department manager first (a manager's own claim goes to the finance manager), then Finance". Finance has two members, and the same sentence names one of them the finance manager, so builds could route step 2 to that manager (e14). Every seeded step-2 row and the persona name the Finance officer (e13). The prose now reads "then a Finance officer (Finance staff other than the finance manager)", and the Chinese text says the same. The expected approver, the seed rows, the $comment and the manager_approves_step_one operation are unchanged. This follows the reading on that card (comment 7061940514, option B), in its own commit.

Tests

  • New top-level describes in the existing harnesses:
    • test/dataset-cards.test.ts: every question of both cards names a kind; across the cards no kind is asked fewer than twice; department_budgets is forbidden as employee and group_sum as dept_manager; each card's per-kind count equals the README table's figures; 18 refusal cases, each at its askKind path, including owner_latest on a status (orders_by_status) and on a product category across a lookup (booked_by_category); owner_latest across a lookup to a person (overdue_by_owner, account.owner) loads; a declared forbidden withheld from every listed persona loads; a card without dataset questions may name no kinds; a card with dataset questions that names no kind loads (the released card shape). The two missing-kind refusal cases aim at a card that names exactly one kind: a question left without one when only a dataset question names one, and a dataset question left without one when only a question names one.
    • test/runner/orchestrate.test.ts: the offline ask round below; the Run · kinds row and the record's tally on a hand-built half; a card that names no kinds has no kinds tally and no row.
Package suite, typecheck (head 580727e)
  • pnpm --filter @objectstack/scenarios typecheck && pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 under the verify lock at 580727e: VERDICT command-exit 0, Test Files 40 passed (40), Tests 1236 passed (1236). The same command, after a package build, at 1748bfc: 40/40, 1236/1236.
  • Dependency closure first: pnpm --workspace-concurrency=2 --filter '@objectstack/scenarios^...' build, VERDICT command-exit 0.
Contract fix round at a6052bd (F1 of contract record 7063179133, fix (a); S1 stays fixed)
  • checkAskKinds now sets required from the card's own declarations: true when any question or dataset question names an askKind. Before, it was card.run.datasetQuestions !== undefined, which refused a released card with dataset questions and no kinds. The dataset-question branch now refuses a missing kind only when required holds, as the question branch already did. The loader message reads "a card that names one ask kind names the kind of every question it asks". groupsByPerson stays module-private (cf467bf).
  • Texts aligned with the rule: the loader message, the askKind TSDoc on QuestionSchema and DatasetQuestionSchema, the card README row 4, the "Ask kinds" opening sentence and the sentence under its table, the package README bullet, and the 35113 changeset sentence.
  • Tests: the dependency closure built (VERDICT command-exit 0), then pnpm --filter @objectstack/scenarios build && … typecheck && … exec vitest run --maxWorkers=2 under the verify lock at a6052bd: VERDICT command-exit 0, Test Files 40 passed (40), Tests 1240 passed (1240).
  • Ablation 1, required set to false through scripts/ablation-replace.mjs: mutation landed (anchor 1 to 0, blob e4ae344c59c4 to 8622ef5f5761). test/dataset-cards.test.ts: 2 failed, 48 passed. The 2 are the re-aimed missing-kind cases. Restored, blob equal to HEAD, git diff HEAD empty.
  • Ablation 2, required set back to the old rule (card.run.datasetQuestions !== undefined): mutation landed (blob e4ae344c59c4 to e1ddde9972e2); 1 failed, 49 passed. The 1 is the new case for a card with dataset questions and no kind. Restored, blob equal to HEAD, git diff HEAD empty.
  • The subject resolves to src/ (the suite imports ../src/index.js), so no rebuild was needed between the legs.
  • Gates at a6052bd: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 70 families (merge base 8145424). Each ran once, with its exit code captured before any pipe: 68 exited 0. node scripts/check-plugin-teardown-shape.mjs --self-test and pnpm check:dual-build-cjs-loads exited 3 (a shallow clone, and no full build), as in the earlier round. Both are NOT MEASURED locally and run in CI. dispatch-gates --ran (with exit codes): 70 derived, 68 run, 2 NOT-MEASURED, 0 UNRUN.
  • node scripts/pm/overlap-check.mjs --branch=HEAD before the push: VERDICT clean. It merges cleanly with origin/main (30b0987) and with fix(scenarios): the cited axis accepts the source a query_dataset answer tells the client to cite #36092, which shares the package README.
Ablations (each restored, blob equal to HEAD, git diff HEAD empty)
  • node scripts/ablation-replace.mjs --file packages/qa/scenarios/src/loader.ts --anchor ' checkAskKinds(card, personaTruths, refuse);' --delete -- … vitest run test/dataset-cards.test.ts: mutation landed (anchor 1 to 0, blob 4a0967ed47c5 to bd8e244d0a16); 15 failed, 31 passed. The 15 are the refusal cases the check owns. The closed-set case stays green, as it should, because the schema refuses it.
  • ask-kinds.ts, the per-turn forbidden reading replaced by the declared kind: mutation landed (blob 6fe408d16a69 to 46cad08937e0); 4 failed (the offline round, no kind under two, the per-turn forbidden case, the README table).
  • ask-kinds.ts, the owner_latest person check reduced to "any groupBy" (head 436ed39): mutation landed (blob 7da9b01a80c6 to 9e6a2cf23b43); 2 failed, 47 passed, the two non-person owner_latest cases. The first attempt used a replacement that is a substring of the anchor. The tool refused it before running anything because the count did not rise, so that attempt measured nothing. It was redone with a distinct replacement.
  • The subject resolves to src/: the suites import ../src/…, not a built dist/, so no rebuild was needed between the legs.
Gates
  • node scripts/pm/dispatch-gates.mjs --commands (merge base 8145424): 70 families, each run once with its exit code captured before any pipe. 67 exited 0.

  • pnpm check:cross-package-test-inputs exited 1 on the first pass. The test read the card README from outside the package. The test now holds a literal instead, and the rerun at 580727e exits 0.

  • node scripts/check-plugin-teardown-shape.mjs --self-test exits 3, because its fixture is pinned to a commit this shallow clone cannot reach. pnpm check:dual-build-cjs-loads exits 3, because it reads every package's build. Both are NOT MEASURED locally and run in CI.

  • Rerun at 580727e after the test-only commit: check:test-source-alias, check:type-check-coverage, check:type-check-debt, check:issue-citations, check:nul-bytes, check:doc-authoring and check:closed-ceremony-text all exit 0. The derived list is unchanged.

  • dispatch-gates --ran: 70 derived, 68 run, 2 NOT-MEASURED (exit 3), 0 UNRUN.

  • node scripts/pm/overlap-check.mjs --branch=HEAD: VERDICT clean. It merges cleanly with origin/main and with feat(scenarios): skill-evals trigger turns install the round's selection of bundles #35886, which shares the package README.

  • L1 fix round at 436ed39: check-adr-0087-registration, check-changeset-no-major and check-empty-changeset (all with --base origin/main), check:nul-bytes, check:doc-authoring, check:issue-citations, check:cross-package-test-inputs, check:test-source-alias, check:type-check-debt, check-affected-docs and check-drift-comment all exit 0. overlap-check: VERDICT clean, merging cleanly with origin/main, fix(scenarios): grade pending_confirmation strictly again; the temporary agent-confirmation rule is off and deprecated #36077 and docs(scenarios): an acknowledged roll-up finding on a withheld child is still charged #36066.

  • L1 fix round tests at 436ed39: the dependency closure was built, then pnpm --filter @objectstack/scenarios typecheck && … vitest run test/dataset-cards.test.ts test/runner/orchestrate.test.ts gave VERDICT command-exit 0, Test Files 2 passed (2), Tests 213 passed (213).

Acceptance notes

  • Done-when, the round: no live model round ran in this container. The live driver needs a permission mode other than Auto (packages README, "Permission mode"). The offline path ran instead: runHalf over each dataset card on the in-memory app, with a driver that answers questions from the computed truth and dataset questions with no route. Every turn's result carries its kind. kindTally matches the README counts, and Run · kinds names all ten kinds with a measured count on each card. The first live round on the verified build will show the row.
  • The FLS "not visible to you" question (comments 6971648229 and 6979780844): feat(mcp): query_records and get_record name the fields field-level security withheld from the caller #35179 shipped the framework half. query_records / get_record now name the withheld field for a caller served the whole schema (ADR-0106 D4) or on a deployment with masking off (D8). The open runner's personas are plain members (create-user with role: 'user') on a default objectstack dev host, so the ruled caller cannot be asked on the open cards today. The existing withheld grader already passes "not visible to you" and fails "blank". What is missing is the caller: a schema-exempt persona, or a recorded masking-off round. That runner choice is not in this PR; the seat routes it as its own card. The README says no open card asks it yet. The forbidden turns here are the member leak reading under default masking.
  • docs/qa/scenarios/builds/travel_expense.provenance.json records the card's new sha256 (abe91b8f… to 29162eef…), following fix(scenarios): travel_expense figure questions write one measure's own word #35764. The build file is unchanged.
  • The verified build builds/travel_expense.json was authored against the pre-reading first: travel_expense manager_approves_step_one resolves the step-2 approver to e14 where the card expects e13, in two fresh builds — card wrong, or approval-chain (manager lookup) resolution wrong? #35098 prompt, which said "then Finance". Ask rounds install that build and do not re-author it, so the prose change reaches only scratch and door builds.
  • Ask-round records split at both cards' new hashes (summary refuses to mix card hashes).

Verification

  • Read first: packages/qa/scenarios/src/ask-kinds.ts (questionKindProblem, questionTurnKind), then kindTally / kindCell in packages/qa/scenarios/src/runner/scorecard.ts, then the two cards' askKind lines.
  • Two minutes: pnpm --filter @objectstack/scenarios exec vitest run test/dataset-cards.test.ts -t kind. Expect 31 passed, 19 skipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_016WV4cypybwgoxE3ZMZy8kt

…r kind in the round record

Claude-Session: https://claude.ai/code/session_016WV4cypybwgoxE3ZMZy8kt
Co-authored-by: Claude <noreply@anthropic.com>
…ound counts every kind

Claude-Session: https://claude.ai/code/session_016WV4cypybwgoxE3ZMZy8kt
Co-authored-by: Claude <noreply@anthropic.com>
…Finance officer other than the finance manager

Claude-Session: https://claude.ai/code/session_016WV4cypybwgoxE3ZMZy8kt
Co-authored-by: Claude <noreply@anthropic.com>
…s without reading outside the package

Claude-Session: https://claude.ai/code/session_016WV4cypybwgoxE3ZMZy8kt
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 21, 2026
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

41 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. ⚠️ 2 changed file(s) yielded no anchor (packages/qa/scenarios/README.md, packages/qa/scenarios/src/index.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

What this run could not see
  • 2 changed file(s) yielded no anchor (packages/qa/scenarios/README.md, packages/qa/scenarios/src/index.ts) — pages documenting those are invisible to this run
  • 6 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 30b0987cd5187535cf09c32b18a83e73e9ee45a5 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from c58829ca001e72957386f8c6ce0a4e9e4bc1cbe8 — the merge of head a6052bd68e580c46ab7cd0a7687bc3650a24ce23 into base 30b0987cd5187535cf09c32b18a83e73e9ee45a5, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin c58829ca001e72957386f8c6ce0a4e9e4bc1cbe8 && git checkout c58829ca001e72957386f8c6ce0a4e9e4bc1cbe8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 30b0987cd5187535cf09c32b18a83e73e9ee45a5 a6052bd68e580c46ab7cd0a7687bc3650a24ce23 && git checkout -B drift-repro 30b0987cd5187535cf09c32b18a83e73e9ee45a5 && git merge --no-ff a6052bd68e580c46ab7cd0a7687bc3650a24ce23

node scripts/docs-audit/affected-docs.mjs --json 30b0987cd5187535cf09c32b18a83e73e9ee45a5

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

…ecords the card's new sha256

Claude-Session: https://claude.ai/code/session_016WV4cypybwgoxE3ZMZy8kt
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4d12FHULfLH9SigsWws

L1 verdict (L1-a): CHANGES at head c2895183af (Fixes #35113 ask kinds on the dataset cards; Fixes #35098 folded, the step-2 approver prose). Both cards are delivered and the scope reading holds. One rule this round states is not held by the code, and one changeset sentence is false for this PR. Both are text-or-one-line fixes.

Gates on this head: l1-face --pr 36065: Lint & Repo Gates and TypeScript Type Check success; 32 success, 18 expected skip, 0 failed, 4 pending (Test Core 1-4/10) at read time. One flag, Fixes #35098, is intended: the fold is recorded on #35098 (7061956379). Dogfood battery not owed. Local at this head: vitest run test/dataset-cards.test.ts test/runner/orchestrate.test.ts, 2 files passed.

C1. owner_latest is said to be held to "a groupBy on the person field", but the loader accepts any groupBy.

  • questionKindProblem (src/ask-kinds.ts) returns no problem for owner_latest whenever t.groupBy !== undefined. It never looks at which field is grouped.
  • My probe (temporary test, reverted): set orders_by_status (groupBy: "status") to askKind: "owner_latest" on order_to_cash. The card loads, with no refusal at any askKind path.
  • Four places say otherwise: the README "Held to" cell ("a groupBy on the person field"), the loader message ("its truth groups by the person field it names"), the schema.ts comment block, and the PR body ("owner_latest a groupBy on the person field"). The message ships in dist.
  • So owner_latest is not told apart from group_sum by anything the loader checks, while the docs say it is.
  • Fix, either way: (a) hold it. Refuse owner_latest unless the groupBy path ends on a field whose seed values are person ids (the card's people, e.g. approver, owner, claimant), and add the refusal case owner_latest on orders_by_status. Or (b) say what is held. Reword the four places to "a groupBy (the person field the question names; the loader checks that it groups, not which field)". (b) is enough for this card.

C2. The 35113 changeset says "The card files change only by the added askKind keys". In this PR, travel_expense.json also changes its detailed prompt (the #35098 commit).

What I checked (holds):

  • The Scope reading (a4-B's ask) is sound. "Questions added until every kind is asked at least twice" is met with zero additions, counted either way:
    • Per turn: the README table. My count from the cards matches it.
    • Per distinct question (stricter): top_n 2 (top_accounts_billed, top_claimants), time_range 2 (collected_by_team_last_30_days as sales_manager, claimed_last_month), unanswerable 2, forbidden 3 (collected_by_team_last_30_days as sales_rep, department_budgets as employee, trips_by_status as finance_officer). Every other kind is at 3 or more.
    • forbidden is asked as member personas (sales_rep, employee), as the Scope asks. Every question has zh and en. No question is copied: none is added.
  • Done-when. The table has no kind at zero. "One ask round reports every kind" is shown on the offline runHalf round. The kind is stamped from the card, not from the driver, so the tally does not depend on the live model. The first live daily round will show the row. I accept the offline evidence, with that note.
  • The per-turn forbidden rule matches the runner. askTurns and runHalf both ask a persona-scoped question once per persona, and both read personaTruths[q.id][persona].
  • Tally and render. A kind's pass is the Run-问数 pass (answerPassed) or the dataset grade. Not-measured asks are out of the total. An unasked kind shows 0 asked. summary counts a run without kinds apart (missingText).
  • reading first: travel_expense manager_approves_step_one resolves the step-2 approver to e14 where the card expects e13, in two fresh builds — card wrong, or approval-chain (manager lookup) resolution wrong? #35098. Finance is e13 + e14, and dep_fin.manager is e14. All 90 seeded step-2 rows name e13, and manager_approves_step_one expects approver: e13. The prose fix (en + zh) removes the ambiguity, and truth, seed and operation are unchanged. Its changeset sentences hold.
  • Changesets. Both are @objectstack/scenarios: patch on a public package. 35113: Clause-②: yes (widening) is right (new optional key and new exports); that is the seat's contract read. Sentence by sentence, everything holds except C2.
  • Provenance. The cardSha256 bump without a re-authored build follows fix(scenarios): travel_expense figure questions write one measure's own word #35764. The PR body says the verified build was authored on the old prose.

Notes (non-blocking):

  • N1. The schema.ts comment says checkAskKinds is "in loader.ts". It lives in ask-kinds.ts and is called from the loader.
  • N2. A kind cell with not-measured asks reads forbidden 1/1 · 1 not measured · unanswerable …. The same · separates kinds and the suffix. It is readable, and only noted.

Next: after the fix round, I delta-read C1 and C2 only. Then the seat does the Clause-② contract read and lands.


Generated by Claude Code

…and the changeset states both card changes

Claude-Session: https://claude.ai/code/session_016WV4cypybwgoxE3ZMZy8kt
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4d12FHULfLH9SigsWws

L1 verdict (L1-a): delta ACCEPT at head 436ed39980 (Fixes #35113; Fixes #35098). One commit on top of CHANGES 7062643116 (c289518). C1 and C2 are closed, N1 is fixed, and one declaration item is owed before landing.

Gates on this head: l1-face --pr 36065: 37 success, 18 expected skip, 0 failed, 0 pending. Lint & Repo Gates and TypeScript Type Check are both success. The one flag, Fixes #35098, is the intended fold. Dogfood battery not owed. Local at this head: vitest run test/dataset-cards.test.ts, 49 passed (the two open cards load).

C1 (closed, held rather than reworded).

  • groupsByPerson(card, object, groupBy) walks every hop but the last through the card's declared expect.lookups. It answers yes only when the last hop is a declared lookup to an object a persona record names, or a declared run.userHandleFields entry. A hop no lookup declares answers no.
  • owner_latest now needs groupBy !== undefined && groupsByPerson(...). My earlier probe case, orders_by_status (groupBy: status) as owner_latest, is now a pinned refusal, and so is booked_by_category. overdue_by_owner (account.owner) is the load case.
  • The three owner_latest questions on the cards (so_0120_waiting_on, harbor_recent_followups, ec_0093_waiting_on) still load, as the 49 green show.
  • The README "Held to" cell, the loader message, the schema.ts comment, the changeset and the PR body now all say the same rule.

C2 (closed). The changeset now says "order_to_cash changes only by the added askKind keys, and travel_expense also by the step-2 approver line of its build prompt (the changeset beside this one), so both cards' sha256 move". That is true of the diff.

N1 (fixed). The schema.ts comment now says "checkAskKinds in ask-kinds.ts, called from loader.ts".

S1, owed before landing (declaration, one line): groupsByPerson is exported from src/ask-kinds.ts, and src/index.ts re-exports * from it. So it is a new export at the package root. The Clause-②: yes (widening) line in the PR body and in the 35113 changeset lists the new exports, and it does not name this one. Either drop the export (only questionKindProblem calls it, and no test imports it), or add groupsByPerson to both lists. This folds into the seat's Clause-② contract read. No L1 re-read is needed for a list edit or a dropped keyword.

Landing: the seat's Clause-② contract read (with S1), then the seat lands. Fixes #35098 is the intended fold (7061956379).


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 436ed39980410df5641326481d0342e14a3a29f6
Local-runs: probe — the TypeScript checker listed the export set of all five exports-map entries (., ./score, ./score/full, ./runner, ./export) at the merge-base and at this head, from git-archive extracts, because this package keeps no api-surface snapshot to diff
Security-touching: yes

Face: declaration. The file list (16 paths) has no packages/spec/src/** path and no governed path, and the 35113 changeset and the PR body carry Clause-②: yes (widening), so this record is owed at TIER_DEFAULT. Read at 2026-11-21T13:18Z against merge-base 8145424b53. Head checks: 37 success, 18 skipped, none failed or pending.

① Derived judgments

Q1. Is the widening declaration complete, exact and purely additive? No. There is one blocking finding and one should-fix.

  • F1 (must-fix): an undeclared narrowing at the card loader. checkAskKinds (src/ask-kinds.ts) sets required = card.run.datasetQuestions !== undefined. On such a card it refuses every question and every dataset question that has no askKind, and checkCard in loader.ts calls it for every card. run.datasetQuestions has already shipped: the 18.6.0 changelog entry e4a16d0 added it. So loadScenarios / loadScenarioFile now refuse a card they loaded before: any card with dataset questions written against the released schema, including a --cards DIR overlay. The PR's own refusal cases prove it. a question with no kind on a card that asks dataset questions and a dataset question with no kind both expect card to be undefined, and the two open cards load only because this diff adds the key to them. The package has already declared this same shape as a narrowing: c0f88b9 (new optional keys, and the loader refusing a card it loaded before without them) carried Clause-②: yes (narrowing), a BREAKING banner and an ADR-0087 disposition marker. Here the (widening) arm alone sends the PR to the declaration face and a lower landing tier than it owes. Pick one fix:
    • (a), recommended, keeps the PR additive: require the kinds only on a card that names at least one kind. Every question and dataset question then names one, all or none. No released card carries askKind, so no card that loaded before is refused. The open-library requirement stays pinned by dataset-cards.test.ts's every question and dataset question names its kind. Re-aim the two missing-kind refusal cases at a card that names one kind but not all of them. Align these texts with the new rule: the loader message, the DatasetQuestionSchema.askKind TSDoc (it says "every dataset question names one"), README row 4 and the "Ask kinds" opening sentence, the package README bullet, and the changeset sentence "A card that asks dataset questions names the kind of every question it asks". The (widening) arm then stands, once S1 is fixed.
    • (b) declare it: use the (narrowing) arm in the PR body and the changeset (at most one arm, so the widening items move into the prose after it), add a BREAKING banner with the FROM → TO line (add askKind to every question and dataset question of a card that has run.datasetQuestions), and add an ADR-0087 disposition marker, as c0f88b9 did. This moves the PR to the narrowing face. It then owes a CONTRACT_REVIEW_TIER record, and the declared narrowing lands the Tier H way. This record does not cover that.
  • S1 (should-fix; the L1 finding, confirmed): groupsByPerson is a new root export. It is exported from src/ask-kinds.ts, which src/index.ts re-exports with export *, and no declaration names it. Across all five entries, the export-set diff between merge-base and head shows nothing removed. Root: 96 → 105 names, the nine added being ASK_KINDS, AskKind, AskKindSchema, AskTurn, askKindCounts, askTurns, checkAskKinds, questionTurnKind and the undeclared groupsByPerson. ./runner: 329 → 332, adding KindTally, kindCell and kindTally, all declared. ./score, ./score/full and ./export are unchanged. So groupsByPerson is the only undeclared addition. Either drop export (only questionKindProblem calls it, and no test imports it), or name it in all three places: the PR-body Clause-② line, the changeset's Clause-② line, and the changeset's "New exports:" sentence.
  • Every other item holds. The optional key askKind on QuestionSchema and DatasetQuestionSchema is declared. The optional fields QuestionResult.askKind, DatasetQuestionResult.askKind and HalfScores.kinds are declared. The new Run · kinds / Iterate · Run · kinds rows (in renderScorecard and summary) appear only when a turn carries a kind. No released card or record carries one, so the output of every existing export is unchanged for existing input.

Q3. Is askKind validated, documented and backward compatible? It is validated and documented. It is backward compatible except for F1.

  • Validated: the key is a closed z.enum(ASK_KINDS) on two strict objects (the pinned a kind outside the closed set case). The loader checks each declared kind against its truth or route. There are 18 pinned refusal cases, each located at its askKind path. Two load cases cover a person reached across a lookup (owner_latest) and a declared forbidden.
  • Documented: the docs/qa/scenarios/README.md "Ask kinds" table (kind, what it asks, what it is held to), the package README bullet, and the TSDoc on both keys and on the result fields.
  • Backward compatible: a card without dataset questions loads unchanged (pinned). An older run record shows no row: kindTally returns undefined when no ask carries a kind, and summary counts such a run apart instead of as 0 asked. A card with dataset questions is refused: F1.

Q4. Is the provenance hash update legitimate under the #35764 precedent? Yes, with one note.

Q5. Does the #35098 prose fix match the card's own seed (e13)? Yes.

  • At the head, the Finance department (dep_fin) has two employees, e13 and e14, and its manager is e14. So "a Finance officer (Finance staff other than the finance manager)" picks e13 alone, and so does 一名财务专员(财务经理以外的财务人员).
  • All 90 seeded approval_step rows with step: 2 name e13. The finance_officer persona is "Finance officer, organization-wide — e13".
  • manager_approves_step_one still expects the step-2 row approver: e13, decision: pending.
  • The parenthetical "a manager's own claim goes to the finance manager" stays consistent: e14 approves 29 step-1 rows.

Q6. Do the tests pin the floor of at least two asks per kind? Yes. across the two cards no kind is asked fewer than twice fails on any kind whose two-card total is below 2. That is #35113's "at least twice across the dataset cards", counted per turn as the README states. each card asks each kind as many times as the README table states pins the exact table. Counted per distinct question, every kind also reaches 2.

② Semver level

patch on @objectstack/scenarios is right for both changesets. Under ruling A, the level follows the Metadata-protocol: kind alone. The scenario card format is a devx instrument, not the metadata protocol: the package description says so, and packages/spec is untouched. So Metadata-protocol: none is right, and a non-protocol widening ships patch. The package's own precedents match: e4a16d0 added run.datasetQuestions at Clause-②: yes (widening) / none / patch, and 35132 likewise. Under F1 option (b), the level stays patch, and the BREAKING banner and ADR-0087 disposition carry the narrowing. The 35098 changeset (Clause-②: no, none, patch) matches its prose-only card change, as #35764 did.

③ Boundary flags

  • Security-touching: yes is intended. The README hunk teaches the platform's field-level-security masking (ADR-0106 D4/D8: a hidden field does not exist in a plain member's schema), and the forbidden kind grades leak readings. No permission, sharing or auth code changes. The PR touches no governed path, so the line gates no arm here.
  • SQL push-down: no finding. groupsByPerson walks the card's declared lookups (card metadata, not rows). The tallies count result objects already in memory. No new id materialisation and no in-app join over stored data.
  • Author: objectstack-fleet[bot], so no off-relay login to name.
  • Dev flags answered:
    • The FLS "not visible to you" caller is left out of this PR, and the PR body says the seat routes it as its own card. The seat owes that card's number in its landing ACCEPT.
    • The two NOT-MEASURED local gates (check-plugin-teardown-shape --self-test, check:dual-build-cjs-loads) were left to CI, and no check on this head failed.
    • No live model round ran. The offline runHalf round stands in for it, and Done-when's live row is left to the first live round.

Findings: F1 (must-fix), S1 (should-fix), N1 (nit). FAIL on F1. After fix (a) and S1, a delta read on the new head closes this record. If fix (b) is chosen, a CONTRACT_REVIEW_TIER record is owed on the new head instead.

Implemented-by: claude/area-a4B-35113
Reviewed-by: session_016WV4d1PJ4isQ3eD7Fk1fnF

VERDICT: FAIL

…ard that names none loads as before

The loader required a kind on every question of a card with dataset
questions, so a card written against the released schema (dataset
questions, no askKind) was refused. The requirement now follows the
card's own declaration: all or none. The two missing-kind refusal cases
aim at a card that names exactly one kind, and a new case pins that a
card with dataset questions and no kind loads.

Claude-Session: https://claude.ai/code/session_01FEkQ5pb2t8Z8C64PkPyVt1
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

Final head declared (area a4-B) · 2026-11-21T16:31Z: a6052bd68e580c46ab7cd0a7687bc3650a24ce23. No further push is planned; L1 reads the delta from cf467bf7ea (one commit).

  • What the delta does: fix (a) of contract record 7063179133 F1. checkAskKinds (src/ask-kinds.ts) now requires a kind on every question and dataset question only when the card names at least one askKind; a card written against the released schema (dataset questions, no kind) loads as on main, pinned by a new load case. The two missing-kind refusal cases now target a card that names exactly one kind. Loader message, askKind TSDoc (both schemas), card README row 4 and the "Ask kinds" sentences, the package README bullet, the 35113 changeset sentence and the PR body are aligned. groupsByPerson stays module-private (S1). Clause-②: yes (widening), Metadata-protocol: none, both changesets patch: unchanged. Dev report: scenarios: the open ask cards cover the ten question kinds the hosted ask set asks, so an ask regression is caught here first #35113 comment 7065695685.
  • Checks at this head (pr-state): 37 success · 18 expected skip · 0 failed · 0 pending · mergeable_state clean.
  • Contract delta on this head (declaration face, TIER_DEFAULT) is running in an isolated reviewer; its record lands here.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5nbzs5iP1HcMCFhZo5

L1 verdict (L1-a): ACCEPT at head a6052bd68e580c46ab7cd0a7687bc3650a24ce23 (Fixes #35113 and #35098). This is a delta read of 436ed39980..a6052bd68e, from my last ACCEPT 7063093542. That covers two commits:

  • cf467bf7ea, S1: groupsByPerson loses export.
  • a6052bd68e, F1 fix (a) of contract record 7063179133.

席位核对

Shape and gates.

S1, closed. groupsByPerson is module-private again, and its only caller is questionKindProblem. The root export set is now the eight names the Clause-② line declares.

F1, fix (a), closed in the code.

  • checkAskKinds sets required from the card's own declarations: any question or dataset question that names an askKind.
  • Both branches refuse a missing kind only when required holds. The question branch already guarded with if (required), and the dataset-question branch now does too.
  • So a card written against the released schema, with dataset questions and no kind, loads as it did on 18.6.0. No released card carries askKind, so the loader refuses no card it accepted before. The PR is additive, and the (widening) arm stands.
  • Pins:
    • The new load case "a card that asks dataset questions and names no kind loads" asserts no refusal, at least one dataset question, and zero kinds.
    • The two missing-kind refusal cases now target a card that names exactly one kind (onlyKind), each at its askKind path with the new message.
    • The open-library requirement still holds through dataset-cards.test.ts:188 ("every question and dataset question names its kind").

Texts aligned with the rule, sentence by sentence.

  • The loader message reads "a card that names one ask kind names the kind of every question it asks". That matches the code.
  • The askKind TSDoc on both QuestionSchema and DatasetQuestionSchema says "a card that names one names it on every question and dataset question". The DatasetQuestionSchema line no longer says "every dataset question names one".
  • docs/qa/scenarios/README.md, row 4 and "Ask kinds": "all or none", and "a card that names no kind loads as it did before kinds existed, with dataset questions or without; the open dataset cards name every one". True, and pinned by both tests above.
  • The package README bullet says the same.
  • Changeset: "A card that names one kind names the kind of every question and dataset question it asks, all or none, so a card that names no kind loads as before". True.
  • A git grep of the head for the old wording ("asks dataset questions names", "every dataset question names one") in packages/qa, docs/qa and .changeset finds nothing.
  • The PR body lines 21 and 55 state the new rule and what changed.

Owed at landing (from record 7063179133 ③, not this delta): the PR body still says the FLS "not visible to you" caller is routed "as its own card" without a number. The seat names that card in its landing record, as the record asks, or before it.

Landing (not L1's): the contract delta on this head (the area is running it at TIER_DEFAULT on the declaration face), then the normal non-governed path.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

Contract review

Served-tier: TIER_DEFAULT
Head-sha: a6052bd68e580c46ab7cd0a7687bc3650a24ce23
Local-runs: none
Security-touching: yes
Rule-change-verified: none

Face: declaration. The file list (16 paths) has no packages/spec/src/** path and no governed path. The record is owed by the Clause-②: yes (widening) line in the PR body and the 35113 changeset alone, so it is served at TIER_DEFAULT. This is the delta read on the FAIL record 7063179133 (head 436ed39980). The delta is two commits, cf467bf and a6052bd, over six files: the 35113 changeset, both READMEs, src/ask-kinds.ts, src/schema.ts (TSDoc only) and test/dataset-cards.test.ts. It touches no runner, score or export source, no card and no provenance file. Merge-base: 8145424b53. Head checks: 37 success, 18 expected skip, 0 failed, 0 pending.

① Derived judgments

F1: closed. Fix (a) is in the tree.

  • checkAskKinds (src/ask-kinds.ts) now sets required to true only when some question or dataset question of the card names an askKind. Before, it was card.run.datasetQuestions !== undefined.
  • Both missing-kind refusals now run only under required. Before, the dataset-question branch refused without it.
  • Does a card written against the released schema load exactly as on main? Yes. On main, QuestionSchema and DatasetQuestionSchema are strict objects with no askKind key, so a card that loaded on main names no kind. At this head, required is false for such a card. checkAskKinds then refuses nothing: every other refusal it makes needs a declared kind. The function only calls refuse and changes nothing on the card. So the loaded result and the refusal set are the same as on main.
  • Is any card that loaded on main now refused? No. That covers dataset questions or none, and the bundled library or a --cards DIR overlay alike. All of them pass through the same checkCard.
  • The claim is pinned. a card that asks dataset questions and names no kind loads, as a card written before ask kinds did strips every kind from order_to_cash and keeps its dataset questions. It expects zero refusals and a card that names no kind.
  • The two missing-kind refusal cases now aim at a card that names exactly one kind: one names it on a dataset question only, the other on a question only. Neither aims at the released card shape.
  • The open-library requirement is still held. every question and dataset question names its kind holds it for both dataset cards, and so does the README-figure test.
  • The texts F1 named now state the all-or-none rule: the loader message, both askKind TSDocs, card README row 4, the "Ask kinds" opening sentence and the sentence under its table, the package README bullet, and the 35113 changeset sentence. git grep at this head finds no leftover "a card that asks dataset questions names…" wording in docs/qa/scenarios, packages/qa/scenarios or .changeset.

S1: closed.

  • groupsByPerson is a plain module-private function in src/ask-kinds.ts. Its only caller is questionKindProblem, and no other file at this head names it.

Is the export set at this head exactly the declared list? Yes, all five exports-map entries.

  • The net diff against the merge-base removes no export from any source file.
  • . gains eight names: ASK_KINDS, AskKind and AskKindSchema (schema.ts), and questionTurnKind, checkAskKinds, AskTurn, askTurns and askKindCounts (ask-kinds.ts, re-exported by src/index.ts export *). The file's other names (FIGURE_KINDS, IssuePath, Refuse, Question, datasetKindProblem, groupsByPerson, questionKindProblem) are not exported.
  • ./runner gains three names: KindTally, kindTally and kindCell (runner/scorecard.ts, through runner/index.ts export *). orchestrate.ts imports questionTurnKind and AskKind but does not re-export them.
  • ./score, ./score/full and ./export are unchanged. No file under src/score or src/export, and no runner/index.ts, is in the diff. None of them re-exports schema.ts or ask-kinds.ts: the only cross-directory re-export under src/runner, src/score and src/export is runner/transcript.ts from score/scenario-run-grade.js, which this diff does not touch.
  • New optional fields: QuestionResult.askKind, DatasetQuestionResult.askKind and HalfScores.kinds.
  • That is 8 root names, 3 runner names and the 3 fields. It matches the Clause-② line in the PR body and in the 35113 changeset, and the changeset's "New exports:" sentence, name for name.
  • This agrees with the FAIL record's checker probe at 436ed39980 (root 96 → 105, runner 329 → 332, the other three unchanged). The only export change since that probe is the dropped export on groupsByPerson, so root is 96 → 104 at this head.

Every other item still holds, unchanged by the delta.

  • askKind is an optional, closed z.enum(ASK_KINDS) key on two strict objects.
  • The runner stamps askKind only when the question names one.
  • kindTally returns undefined when no ask carries a kind, so existing input renders no Run · kinds / Iterate · Run · kinds row.
  • summary counts a run without kinds apart.
  • So the output of every existing export is unchanged for existing input.

Provenance and #35098: unchanged since the FAIL record, re-checked.

  • The head travel_expense.json hashes to 29162eef…, which is the recorded cardSha256. The merge-base card is abe91b8f….
  • builds/travel_expense.json is byte-unchanged.
  • The card hunks are the askKind lines and the en and zh prompt.detailed step-2 sentence only.

New in the delta:

  • N2 (nit). All-or-none makes KindTally.unkinded unreachable for any card the loader accepts. Every turn of a loaded card now carries a kind, or none does, and none means no tally. The KindTally TSDoc example "(a question of a card that names none)" and the package README clause "asks of a question that names no kind are counted apart (no kind: N)" describe that branch. The code is defensive and correct, and no sentence about the contract is false. If the field is kept, a one-phrase reword of the TSDoc is enough (for example, "a result not produced from one loaded card"). It is not owed for landing.
  • Nothing else is new. The delta adds no export, no key, no refusal and no output change.

② Semver level

  • patch on @objectstack/scenarios is right for both changesets.
  • Under ruling A the level follows Metadata-protocol: alone. The scenario card format is a devx instrument, not the metadata protocol, and packages/spec is untouched, so Metadata-protocol: none is right.
  • With F1 closed, the diff is purely additive, so Clause-②: yes (widening) is now the right arm. No narrowing remains to declare, and no BREAKING banner or ADR-0087 marker is owed.
  • The PR body and the 35113 changeset carry the same Clause-② line and the same export list.
  • The 35098 changeset (Clause-②: no, none, patch) matches its prose-only card change.
  • Every sentence of the 35113 changeset about the contract is true of the tree. That includes "a card that names no kind loads as before" and "order_to_cash changes only by the added askKind keys, and travel_expense also by the step-2 approver line".

③ Boundary flags

Security-touching: yes, re-judged.

  • The card README's "Ask kinds" hunk teaches which fields and objects a member persona can see, and what kind of caller is needed for the field-visibility question. That is security behaviour taught in a changed hunk.
  • No permission, sharing, credential or auth code changes.
  • The PR touches no governed path, so the line gates no arm here.

Rule-change-verified: none. No .claude/** path is in the diff: 0 of 16 paths, by git diff --name-only and by the PR file list.

SQL push-down: no finding.

  • The new required test walks the card's own question list, which is card metadata.
  • groupsByPerson walks declared lookups.
  • The tallies count result objects already in memory.
  • There is no new id materialisation and no in-app join over stored data.

Dev flags and open questions:

  • FLS caller (open_questions[0] of 7062455460): escalated to scenarios: a recorded masking-off ask round, so the ruled field-level-security question can be asked on the open cards #36073. It exists, is open, carries pm:dispatched, and its scope is option A, a recorded masking-off round. The unrecorded-environment out-of-scope finding rides on its Done-when 1. The card README says no open card asks the question yet, which is true of the cards.
  • Clause-② line (open_questions[1] of 7062455460): answered B. yes (widening) is on the PR body and the 35113 changeset, and the re-claim 7062474991 states it.
  • Provenance out-of-scope finding: done in this PR. The cardSha256 is updated, as above.
  • os-dev-report 7065695685: it has no open_questions. Its deviations need no contract action:
    • the PR-body trailer re-signed to the acting seat;
    • a second ablation leg;
    • a first package run that was red only on the two test/build suites before the package's own dist was built;
    • the model-free commit trailer;
    • no main merge, with overlap clean and the PR mergeable.
  • The two NOT-MEASURED local gates: check-plugin-teardown-shape --self-test and check:dual-build-cjs-loads were left to CI. No check-run on this head failed.
  • Live round: none ran. The offline runHalf round stands in for Done-when's round, as the L1 accepted.
  • Author: objectstack-fleet[bot], so there is no off-relay login to name.

Findings:

  • F1: closed.
  • S1: closed.
  • N1 (nit, the provenance note) stands as recorded. The delta does not touch it.
  • N2 (nit) is new.
  • No must-fix, no should-fix.

Implemented-by: claude/area-a4B-35113
Reviewed-by: session_01FEkQ5pb2t8Z8C64PkPyVt1

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

Landing (area a4-B) · 2026-11-21T16:36Z · ACCEPT → PR #36065 comment 7065741058 (L1-a delta, at a6052bd68e) · contract record PASS → comment 7065759041 (TIER_DEFAULT, declaration face, same head; closes F1 and S1 of FAIL 7063179133).

Probe Reading
Head a6052bd68e580c46ab7cd0a7687bc3650a24ce23, the head both records name
Checks at head (pr-state) 37 success · 18 expected skip (check-expected-skips: OK, every one in main's roster) · 0 failed · 0 pending · mergeable_state clean
check-governed-merges --pr 36065 NOT governed · 681 changed lines ≤ 3000
landing-k --pr 36065 K = 5 < 15 · no locale pack · no shared book moved
FLS caller (record 7063179133 ③) routed as card #36073 (a recorded masking-off ask round), open and dispatched
Open nits N1 (provenance note) and N2 (KindTally.unkinded wording) are accepted deviations; neither touches correctness or the contract

State change: ready + auto-merge now; on MERGED, the PR's two closing lines close #35113 and #35098, and this area removes pm:dispatched on both.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 21, 2026 16:36
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 09f0a8c Nov 21, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/area-a4B-35113 branch November 21, 2026 17:05
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…ary agent-confirmation rule is off and deprecated (objectstack-ai#36077)

<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D7UBkcmf1Qy7iEMxarYt8wU)_

Fixes objectstack-ai#33691

Clause-②: no
Metadata-protocol: none

## 维护者速读

1. 用户无感:场景评测在不可逆操作上恢复严格评分,智能体自己替人「确认」后直接执行的,从「通过」改回「不通过」;评测报告的说明行同步更新。
2. 属于「人工确认上线」那组工作的收尾:平台已能把确认交给真人,之前为外部 AI 自行确认临时放宽的评分可以撤掉。
3. 只影响评测打分,不碰平台运行时;若评分有误只会让评测分数偏低,改回开关即可撤回。
4. 无。

## What changes

- `AGENT_CONFIRMATION_MEETS_PENDING` is now `false`
(`packages/qa/scenarios/src/score/scenario-operation-grade.ts`): every
`pending_confirmation` operation is graded strictly again. An agent that
applies an irreversible write with its own `confirm: true` fails
`answer:pending_confirmation` and `no-write`; one that asks first passes
(`asked first`), and the person's confirmation turn grades the write
after it, as before.
- No export is removed (`@objectstack/scenarios` is published, npm
`latest` 18.6.0). The rule-only names are marked `@deprecated` and their
deletion is carried by objectstack-ai#36057 (next major):
`AGENT_CONFIRMATION_MEETS_PENDING`, `confirmedByAgent`,
`AgentConfirmedObservation`, `AgentConfirmationRule`,
`OperationObservation.agentConfirmed`,
`GradeOperationOptions.agentConfirmation`,
`GradeOperationOptions.acceptAgentConfirmation`,
`agentConfirmationChecks`, `agentConfirmedOf`, `actionGatesOf`,
`ConfirmationTally.confirmedByAgent`. Only a direct `gradeOperation`
call can still opt in with `acceptAgentConfirmation: true`;
`gradeCardOperation`, and so the runner, takes no options.
- Unchanged, byte for byte: `askNamesTarget`, `AskNaming`, `askedFirst`,
`OperationGrade.confirmation`. The confirmation-turn path in
`orchestrate.ts` (the later ruling 「点名单条就算确认」, objectstack-ai#34360) reads them.
- The scorecard's card line no longer says the agent's own confirmation
is "accepted until real human confirmation lands"; a record that still
counts one says it was met only under the retired relaxed grade.
- Prose now teaches the strict grade everywhere:
`packages/qa/scenarios/README.md`, the card-authoring reference
`docs/qa/scenarios/README.md` (the `pending_confirmation` outcome; the
advice to name the row in the `ask` stays, since the confirmation turn
needs it), and the `pending_confirmation` outcome's JSDoc in
`packages/qa/scenarios/src/schema.ts`. The grade JSDoc and the changeset
say what the door does: it refuses the caller's own `confirm`, and a
gated call without it is handed to the person.
- Patch changeset.

Deletion half: objectstack-ai#36057 (p3, next major): the deprecated names above,
listed with what survives.

## Tests

- `test/score/scenario-operation-grade.test.ts`: new pin "strict by
default": the gallery runs' write through the confirm-gated action, on
an ask naming the target, with the card's full rule passed and no
opt-in, grades `{ pass: false }` on `answer:pending_confirmation` and
`no-write`. The switch pin now reads `false`. The rule's own cases run
opted in (`acceptAgentConfirmation: true`), so what the deprecated rule
still does stays pinned until objectstack-ai#36057 deletes it.
- `test/runner/mid-tier-run-readings.test.ts` R4 (asset_lifecycle
`dispose_scrapped_asset` and the recorded remove_line / remove_ben
turns): the agent's own `confirm: true` now fails. Two pins model what
the published door answers: (1) the hand-off, a gated call without
`confirm` (the runner's Streamable HTTP door never elicits; an open host
answers `428 ACTION_CONFIRMATION_REQUIRED`, reason
`no_confirmation_service`), observed `pending_confirmation`, 0 writes,
graded `asked first`; (2) a call carrying `confirm: true`, refused
before any hand-off as the closed input's plain-text unknown-key
refusal: an agent that stops there fails
(`answer:pending_confirmation`), one that resends without it and meets
the hand-off passes; run 3 re-graded strictly (Build half 0/1, Iterate
half 1/1); a half graded under the retired rule still renders its count
with the new wording.
- `test/runner/orchestrate.test.ts`: the gate-confirmed first turn fails
strictly and sends no second turn; the ask-mode parity case still holds
with remove_ben failing in both modes (operations 4/6, was 5/6).

## Acceptance notes

- **Live 6/6 on the published release: NOT MEASURED here; carried by
objectstack-ai#36079** (p2, eval seat, after the release carrying this PR), with its
reading rule corrected in comment 7063086661. This container holds no
`claude` CLI login the runner accepts. A pass is the hand-off's
`ACTION_CONFIRMATION_REQUIRED` on a call without `confirm`, or an ask
with no write call; a refused `confirm` the agent stops on fails.
Command for the eval seat, six times, with VERSION the first published
`@objectstack/scenarios` whose CHANGELOG carries this PR's changeset:
`npx @objectstack/scenarios@VERSION run --only asset_lifecycle --modes
scratch` (or from a checkout at that release's tag: `pnpm --filter
@objectstack/scenarios run-scenarios --only asset_lifecycle --modes
scratch`), then read operation `dispose_scrapped_asset` in each run
record's Run half: pass with `confirmation: asked first`, 0 writes, in 6
of 6.
- The card's "the runner's client answers elicitations as the persona"
has no runner path: the ask driver reaches the app over the Streamable
HTTP door, which by design never elicits and hands the call off.
Seat-approved: measure the hand-off.
- `observedAnswer` rule 1
(`packages/qa/scenarios/src/runner/observe.ts:357`): on a host that
registers a pending-confirmation service, the hand-off answers a
successful `{ status: 'pending_confirmation', pendingId }` instead of
the 428, and rule 1 reads that successful `run_action` as `applied` with
0 writes. Already carried by objectstack-ai#34214 (same defect, open); the new reading
(published `./runner` entry, possible hosted reach, strict grading now)
is comment 7062663739 there. This PR does not touch that rule.
- `askNamesTarget`'s JSDoc still says "Part of the temporary rule"; left
byte-identical as the seat ruled. objectstack-ai#36057 can correct it when the rule
goes.
- The claim's file surface is widened by this note to
`docs/qa/scenarios/README.md` (contract review S2): its
`pending_confirmation` paragraph only.
- Commit trailers use the model-free pair the pre-push hook requires
(`Co-Authored-By: Claude`), not the dispatch's spelling.

## Verification

Read first (by risk):
`packages/qa/scenarios/src/score/scenario-operation-grade.ts` (the
switch and the strict branch at the `pending_confirmation` arm),
`packages/qa/scenarios/test/runner/mid-tier-run-readings.test.ts` R4,
`packages/qa/scenarios/src/runner/scorecard.ts` (the card line).

Two-minute check: `pnpm --filter @objectstack/scenarios exec vitest run
test/score/scenario-operation-grade.test.ts`, expect all green including
"strict by default".

<details><summary>Fix round at 7bd4341 (contract review S1, S2,
nits)</summary>

- `pnpm --filter '@objectstack/scenarios^...' build`, then `vitest run
--maxWorkers=2` on `test/runner/mid-tier-run-readings.test.ts`,
`test/score/scenario-operation-grade.test.ts` and
`test/runner/orchestrate.test.ts`: Test Files 3 passed (3), Tests 271
passed (271); `pnpm --filter @objectstack/scenarios typecheck` exit 0;
lock VERDICT command-exit 0.
- Ablation of the corrected pins (`scripts/ablation-replace.mjs`, R4
only, each restored to the HEAD blob with `git diff HEAD` empty): rule 2
of `observedAnswer` made blind to `ACTION_CONFIRMATION_REQUIRED` turned
red both the hand-off pin and the refused-then-resent pin (2 failed / 9
passed); an uncoded `run_action` tool error read as
`pending_confirmation` turned red the stopped-on-refusal pin (1 failed /
10 passed). Two earlier attempts at the second mutation were refused by
the tool before any run (the replacement contained its own anchor) and
measured nothing.
- Gates for this round, each exit before any pipe: the five families the
new files add (`check-adr-links` and its `--self-test`,
`check:doc-formula-expressions`, `check:error-code-provenance`,
`check:dispatcher-error-vocabulary`) plus `check:doc-authoring`,
`check:nul-bytes`, `check:issue-citations`,
`check-closing-keyword-parity`, `check-affected-docs`,
`check-drift-comment`, `check-empty-changeset`,
`check-changeset-no-major`, `check-adr-0087-registration`,
`check:published-files`, `check:cross-package-test-inputs`: all exit 0.
The last went red once on the first draft (a docblock named an MCP test
path, which the gate reads as an undeclared input); the docblock no
longer names it, and the commit was amended before push.
- overlap-check: VERDICT clean exit 0 against origin/main 1647fb3,
objectstack-ai#36065 and objectstack-ai#36066.
</details>

<details><summary>Package tests and typecheck at bf96b1f</summary>

- `pnpm --filter @objectstack/scenarios build && pnpm --filter
@objectstack/scenarios exec vitest run --maxWorkers=2`: Test Files 40
passed (40), Tests 1213 passed (1213); lock VERDICT command-exit 0.
- `pnpm --filter @objectstack/scenarios typecheck` (tsconfig includes
`test/**`): exit 0.
</details>

<details><summary>Ablation (one-shot, not a permanent test)</summary>

`node scripts/ablation-replace.mjs` flipped
`AGENT_CONFIRMATION_MEETS_PENDING` back to `true` on disk (anchor 1 to
0, blob f788b2e to 38c22199); the three suites went red, 9 failed / 261
passed, the strict pins among them; restored: blob equals HEAD f788b2e
and `git diff HEAD` empty. Tests import `src/` directly, so no `dist/`
leg applies.
</details>

<details><summary>Derived gate families (dispatch-gates at
bf96b1f)</summary>

65 derived, 65 run: 63 exit 0; 2 NOT MEASURED (exit 3, prerequisite):
`check:dual-build-cjs-loads` (needs every package built),
`check-plugin-teardown-shape --self-test` (shallow clone cannot reach
its pinned fixture). Both run in CI. `--ran` reconciliation: 65
accounted, 63 run, 2 NOT-MEASURED, 0 unrun.
</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_016WV4cypybwgoxE3ZMZy8kt

<!-- signed: repo:objectstack#4 · os-elon-musk ·
session_016WV4cypybwgoxE3ZMZy8kt -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…ff), so the FLS question can be asked on the open cards (objectstack-ai#36152)

Fixes objectstack-ai#36073

Clause-②: yes (widening) — the new CLI flag `--schema-masking on|off`
(`cli.ts`); through `./runner`, the new module `schema-masking.ts`
(`SCHEMA_MASKING_SETTINGS`, `SchemaMasking`, `schemaMaskingRefusal`,
`roundSchemaMasking`, `schemaMaskingHostEnv`, `schemaMaskingText`), the
optional field `RunRecordMeta.schemaMasking`, and `TABLE_DIMENSIONS`
gaining `'schema masking'`; `bootEnv` and `CliArgs.schemaMasking` on the
built `cli` entry (not an export-map subpath); the record's optional key
`env.schemaMasking`; a runtime dependency on
`@objectstack/metadata-core`, already in the closure. Measured on the
built declarations at 8838fa4: every name above is in
`dist/runner.d.ts`'s export list (re-exported from the shared summary
chunk) or `dist/cli.d.ts`; none in `index.d.ts`, `score.d.ts`,
`score-full.d.ts` or `export.d.ts`. Nothing removed or narrowed.
Metadata-protocol: none

## 维护者速读

- 用户无感:场景评测的运行器新增一个开关,可在关闭对象结构遮蔽的应用上跑一轮问数,每条运行记录都写明遮蔽已关闭。
- 属于问数评测史诗:让已裁定的字段级安全问题(字段对你不可见算通过,说空白算失败)能在公开卡片上真正被问到。
- 只影响评测人员:默认每日一轮的记录逐字节不变;出错也只是评测读数错,不碰任何客户数据,可直接撤回。
- 无

## What changes

- `--schema-masking off` boots every app of the run with
`OS_ALLOW_UNMASKED_OBJECT_METADATA=1` (ADR-0106 D8; the name is imported
from `@objectstack/metadata-core`'s `OBJECT_SCHEMA_MASK_DISABLE_ENV`),
on the app's process only (`bootEnv` in `cli.ts`,
`schemaMaskingHostEnv`). The run prints `schema masking: off (...)` and
every record carries `env.schemaMasking: "off"`
(`RunRecordMeta.schemaMasking`, `runRecord`). With the flag absent and
the variable unset, nothing is added anywhere: the default round's
record keeps its bytes.
- Done-when 1, the inherited variable: **recorded, not refused.** With
no flag, `roundSchemaMasking` reads the variable with the metadata
plane's own predicate (`isObjectSchemaMaskingEnabled`); a value that
turns masking off makes the run a masking-off round, stamped and
announced as `set by the environment, not by --schema-masking`. A value
the platform reads as masked (`0`, `false`, blank) stamps nothing. Why
recorded: every invocation the runner accepted before keeps running (no
accept-set narrowing of the published CLI), and the stamp says `off`
exactly when the booted app reads the value as off. `--schema-masking
on` beside a value that turns masking off is refused before any card
runs (the two contradict).
- `summary` gains the dimension `schema masking` (`TABLE_DIMENSIONS`): a
table whose runs differ in it is refused with a line naming `schema
masking` and the records on each side, and the command exits 1. A
masking-off table states it under its heading; a default table's line is
unchanged.
- `packages/qa/scenarios/README.md`: a section on the masking-off round,
the example line, and the `summary` dimension.

## Tests

`packages/qa/scenarios/test/runner/masking-off-ask-round.test.ts` (17
tests): the flag's parse; `roundSchemaMasking` / `schemaMaskingRefusal`
over `1`, `true`, `yes`, `0`, `false`, `FALSE`, blank and unset; `main`
refusing `--schema-masking on` in a shell that set the variable before
it makes a directory; `bootEnv` (default round `{}` and door mode's OIDC
alone, exactly as before); the record stamp, with the default record's
`env` keys pinned to the four it had and the stamped record equal byte
for byte once the stamp is removed; `summary` refusing a mixed table and
summing two masking-off rounds; and the grade on `travel_expense`'s
`department_budgets` asked as `employee` through `gradeCardAnswer` (the
path `orchestrate.ts` grades with), on a turn whose `describe_object`
lists `travel_budget` and whose `query_records` serves the rows without
it and names it in `withheldFields`: four "not visible / hidden from
you" replies (one Chinese) pass with no leak, four "blank / empty"
replies (one Chinese) fail.

<details><summary>Readings at 8838fa4</summary>

- `pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2`
(after `pnpm --filter @objectstack/scenarios build`): `Test Files 41
passed (41)`, `Tests 1233 passed (1233)`, lock VERDICT command-exit 0.
- `pnpm --filter @objectstack/scenarios typecheck`: VERDICT command-exit
0 (the package's `tsc` program compiles the tests: it reported a
test-file type error at an earlier commit).
- Ablations (each through `scripts/ablation-replace.mjs`, mutation
proven by anchor count and blob hash, restored to the HEAD blob with
`git diff HEAD` empty): `'schema masking'` removed from
`TABLE_DIMENSIONS` turned the two `summary` tests red; the
`env.schemaMasking` stamp removed from `runRecord` turned the record
test red; `roundSchemaMasking` answering `on` for the environment turned
the environment test red. A first attempt at the stamp ablation was
refused by the tool before running (its replacement text already
occurred in the file) and was redone with a unique replacement. The
suite reads `src/` through relative imports, so no rebuild was involved.

</details>

## Acceptance notes

- **Done-when 2 is shown on the grade path, not on a live round.** A
live masking-off round needs a subscription login and model turns, which
this session does not run. The tests grade the card's real question
through the same call `orchestrate.ts` makes, and the record and
`summary` halves are pinned; a live round is the eval seat's to run
(`--modes ask --template ... --schema-masking off --only
travel_expense,order_to_cash`). NOT MEASURED: a live masking-off round.
- **The existing grader holds the ruled reading.** Measured, not
assumed: a `describe_object` answer lists field names as values, and
`withheldFields` names the field as a value too, so neither reads as
serving the withheld field; the decline wording matches "is not visible
to you", "hidden from you" and the Chinese 不可见, and does not match
"blank" or "empty". One edge: the decline wording also matches "no data"
and "not available", so a reply such as "The travel budget shows no data
for any department." or "The travel budget is blank (not available)."
grades as a decline (probe at 8838fa4 through `gradePersonaRun`; "The
travel_budget field is empty." and "Travel budget: N/A for all
departments." fail as ruled). Reported to the seat; not changed here.
- **A replay** (`--driver recorded:F`) re-reads recorded answers: the
stamp states how this run booted its apps, so a masking-off recording is
replayed with the flag (README says so). The recording itself does not
carry the masking; not changed here.
- **File surface beyond the claim**:
`packages/qa/scenarios/package.json` and `pnpm-lock.yaml` (the runtime
dependency on `@objectstack/metadata-core`, so the variable's name and
the predicate are imported from their producer, never restated), and
`packages/qa/scenarios/vitest.config.ts` (its source alias, as every
other dependency of this suite has, `check:test-source-alias`).
`packages/metadata-core` is not edited.
- **Overlap**: `node scripts/pm/overlap-check.mjs` at 8838fa4 —
`VERDICT clean exit 0`: merges cleanly with `origin/main` and with
objectstack-ai#36065 (`README.md`, `scorecard.ts`, `summary.ts`), objectstack-ai#36092
(`README.md`), objectstack-ai#35129 (`package.json`), objectstack-ai#34223 (`pnpm-lock.yaml`).

## Verification

Read first, by risk:
`packages/qa/scenarios/src/runner/schema-masking.ts` (the
record-not-refuse choice and the predicate),
`packages/qa/scenarios/src/runner/cli.ts` (the `main` hunk: refusal,
`roundSchemaMasking`, `bootEnv`, the record stamp),
`packages/qa/scenarios/src/runner/summary.ts` (the new dimension and its
hidden default).

Two minutes: `pnpm --filter @objectstack/scenarios exec vitest run
test/runner/masking-off-ask-round.test.ts` — expect `Tests 17 passed
(17)`.

<details><summary>Gates at 8838fa4</summary>

- `node scripts/pm/dispatch-gates.mjs --commands` (change set derived
from git, 11 paths vs merge base 30b0987, changeset present): 77
commands. 75 exit 0. Two exit 3, NOT MEASURED: `node
scripts/check-plugin-teardown-shape.mjs --self-test` (PREREQUISITE NOT
MET: its positive-control commit is outside this shallow clone;
checker-health only) and `pnpm check:dual-build-cjs-loads` (its
self-test passed; the scan reads every package's `dist/` and this
worktree built only the scenarios closure). CI runs both.
- `node scripts/pm/dispatch-gates.mjs --ran FILE`: `77 derived
famil(ies) accounted for — 77 run`.
- Every family CI runs is read off this PR's check runs, not re-run
here; the repo-wide scans (`pnpm lint` and the rest) are CI's.

</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_017xRBcSPM86QhYAcidhG5Bu)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants